package com.blast.comicsisland.model.topic;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.LinkedList;
import java.util.List;

/**
 * Created by dell on 2015/6/24.
 */
public class Info {
    private List<SpecialDescription> specialdescription;

    public void parseJSON(JSONObject jsonObject){
        try {
            JSONArray array = jsonObject.getJSONArray("specials");
            int length = array.length();
            if (length > 0){
                specialdescription = new LinkedList<SpecialDescription>();
                for (int i = 0; i < length; i++) {
                    JSONObject object = array.getJSONObject(i);
                    SpecialDescription sd = new SpecialDescription();
                    sd.parseJSON(object);
                    specialdescription.add(sd);
                }

            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }
    public List<SpecialDescription> getSpecialdescription() {
        return specialdescription;
    }

    public void setSpecialdescription(List<SpecialDescription> specialdescription) {
        this.specialdescription = specialdescription;
    }
}
